package com.ruoyi.job.task;

import com.erp.auto.domain.ErpAutoInfoModuleConfig;
import com.ruoyi.auto.api.RemoteAutoModuleService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Component("autoInfoModuleTask")
public class AutoInfoModuleTask {
    
    @Resource
    RemoteAutoModuleService remoteAutoModuleService;
    
    public void createModule() {
        List<ErpAutoInfoModuleConfig> infoModuleConfig = remoteAutoModuleService.getInfoModuleConfig(null);
        for (ErpAutoInfoModuleConfig erpAutoInfoModuleConfig : infoModuleConfig) {
            remoteAutoModuleService.implement(erpAutoInfoModuleConfig);
        }
    }
}
